-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update impl
-image, tests and enable tool version strings
#4
Conversation
impl
-image, tests and enable tool version strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @se-bi! Sorry for the delay in getting back to you.
- Separating impl images regarding ice40 and ecp5 architectures
- Adding tools of icestorm and prjtrellis, respectively
Agree to both changes, but not in the same images. That is:
impl:ice40
: GHDL + Yosys + nextpnr-ice40impl:ecp5
: GHDL + Yosys + nextpnr-ecp5impl:pnr
: GHDL + Yosys + nextpnr-ice40 + nextpnr-ecp5impl:icestorm
:impl:ice40
+ icestormimpl:prjtrellis
:impl:ecp5
+ prjtrellisimpl:latest
:impl:pnr
+ icestorm + prjtrellis
Feel free to implement some of them only (the ones you are most interested in). Also, feel free to discuss the naming.
Clone Github Projects instead of Tar-archive via codeload, to have a meaningful
--version
return of the builds
While it might be acceptable in build images/stages, it's a no-go for the "production" images. Be careful with that.
Add some test calls of tools (
--version
or similar)
This is nice! However, checks such as --version
or which
should be better contributed to hdl/smoke-tests. smoke-tests is a submodule of this repo, located in test/smoke-tests
. Test scripts in this repo should first call the relevant smoke-tests and then run further checks.
nextpnr.dockerfile
Outdated
&& cd /tmp/nextpnr \ | ||
&& curl -fsSL https://codeload.github.com/YosysHQ/nextpnr/tar.gz/master | tar xzf - --strip-components=1 \ | ||
&& cd build \ | ||
RUN git clone --depth 1 https://github.com/YosysHQ/nextpnr.git /tmp/nextpnr \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With --depth 1
tags are not retrieved, are they? Some projects show the version as a difference from the last tag, plug the SHA of the current commit. See, for example GHDL 1.0-dev (v0.37.0-1123-g8ed35277) [Dunoon edition]
. "Shallow clones" don't work in those cases.
nextpnr.dockerfile
Outdated
&& cd /tmp/nextpnr \ | ||
&& curl -fsSL https://codeload.github.com/YosysHQ/nextpnr/tar.gz/master | tar xzf - --strip-components=1 \ | ||
&& cd build \ | ||
RUN git clone --depth 1 https://github.com/YosysHQ/nextpnr.git /tmp/nextpnr \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an experimental feature that allows using resources from previous stages without increasing the size of the current stage. See:
- https://github.com/ghdl/docker/blob/master/vunit.dockerfile#L35
- https://github.com/ghdl/docker/blob/master/vunit.dockerfile#L1
That would allow you to clone the repo once only.
Anyway, this is not critical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about splitting the stages here, and base each build on that same layer, where the git is fetched once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes sense. Cloning the repo twice was an overlook!
At the same time, build-all
should be build-generic
. There is no need for building nextpnr-ice40
and nextpnr-ecp5
twice! See #10 (comment).
However, if you want to contribute that, better do it in a PR for that only. That will allow us to merge it faster, and #10 might be rebased on top of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This:
At the same time, build-all should be build-generic
and
See #10 (comment).
resolves some confusion with building some parts of nextpnr
twice
and I will integrate that.
@se-bi, I suggest squashing your commits in a single one, and then rebasing that on top of master. I believe that will make it easier to deal with possible conflicts. You can later split them again, if you want to keep several commits in the history. For instance, the change related to adding |
8a8b069
to
3297403
Compare
Hey @eine, sorry for the delay.
I rebased everything and squashed some commits.
Should we also make the changes within (I tried integrating that dependency once, but didn't work as soon as expected and was not patient enough...) Btw. thanks @umarcor for the scripts in |
Architecture dependent: - impl:ice40: GHDL + Yosys + nextpnr-ice40 - impl:ecp5: GHDL + Yosys + nextpnr-ecp5 - impl:pnr: GHDL + Yosys + nextpnr-ice40 + nextpnr-ecp5 - impl:icestorm: impl:ice40 + icestorm - impl:prjtrellis: impl:ecp5 + prjtrellis - impl:latest: impl:pnr + icestorm + prjtrellis
No worries at all! The conception of organisation HDL is that all of us are busy and we are already contributing/working on other several open source projects. These repositories are not a priority and we do not need to rush for having features added. The purpose is to provide a robust and reasonably stable set of solutions for the community, which allows us to eventually reduce the maintenance burden in the other repos. That is, if we can provide a container that multiple projects can use, they will use it. If we don't, they won't do CI or they will use their custom solution, which most of the projects are already doing. In other words, this org is a low-pass filter. Sit down, relax, and have fun building these awesome tooling 😉
Yes please. We can split this into as many PRs as you wish. We can keep this one as a reference and handle each relevant modification at a time. As said, no rush. Let's find our rythm. Once you/we get familiar with this codebase, the dance will flow.
In fact, you cannot make it work. Workflows are independent, thus, executed on independent virtual machines (probably located in different datacenters depending on the day/time). As a result, the images you build in one workflow are not visible to others. Successfully built and tested images need to be pushed to a registry (we use dockerhub), so that later executions of other workflows can use them by name. Yet, you are not allowed to push
Nonetheless, if you want to actually fork this repo and have your own namespace in an image registry, you are entitled to do so; this is free software. We'd prefer if enhancements were contributed here (as we are doing in these PRs), but any user is implicitly invited to build custom variants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks nice overall! Most of the test scripts, dockerfiles and workflows are good. Just a few fixes and rebasing/splitting.
- run: dockerBuild nextpnr:ecp5 nextpnr ecp5 | ||
- run: dockerBuild nextpnr:prjtrellis nextpnr prjtrellis | ||
- run: dockerBuild pkg:nextpnr-ecp5 nextpnr pkg-ecp5 | ||
- run: dockerBuild pkg:nextpnr-all nextpnr pkg-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rename all
to generic
and make pkg:nextpnr-generic
contain that one only. I think we don't need a pkg:nextpnr-all
.
@se-bi, I think this is all done 🎉, isn't it? Can we close it? |
Thanks, @eine for the discussion on #1 and adding the impl image.
(Surprisingly, the documentation was ahead ... 😌 )
Some ideas came up on that:
--version
return of the builds--version
or similar)(see the CI runs, which are not running unchanged parts and pushing into different DockerHub Repositories
se-bi/hdl-containers@develop...se-bi:test/build-version)